﻿namespace Gonte
{
    /// <summary>
    /// The interface for the state pattern
    /// </summary>
    public interface IState
    {
        /// <summary>
        /// Called when the state holder transitions to this state
        /// </summary>
        /// <param name="stateHolder">The holder of this state</param>
        void OnEnter(IStateHolder stateHolder);

        /// <summary>
        /// Called when the state holder transitions from this state
        /// </summary>
        /// <param name="stateHolder">The holder of this state</param>
        void OnExit(IStateHolder stateHolder);

        /// <summary>
        /// Handles the current state
        /// </summary>
        /// <param name="stateHolder">The holder of this state</param>
        void Handle(IStateHolder stateHolder);
    }
}
